﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="LeaveHourInput.ascx.cs" Inherits="Controls_LeaveHourInput" %>
<script runat="server">
    protected void ddlHours_DataBinding(object sender, EventArgs e)
    {
        (sender as ListControl).Items.Clear();

        for (int i = 0; i < 24; i++)
        {
            (sender as ListControl).Items.Add(i.ToString());
        }
    }

    protected void ddlMinutes_DataBinding(object sender, EventArgs e)
    {
        (sender as ListControl).Items.Clear();

        (sender as ListControl).Items.Clear();

        (sender as ListControl).Items.Add(new ListItem("00", "0"));
        (sender as ListControl).Items.Add(new ListItem("30", "30"));       
    }    
</script>
<My:MyDropDownList ID="ddlHours" runat="server" OnDataBinding="ddlHours_DataBinding"></My:MyDropDownList>
<asp:Localize runat="server" Text="<%$Resources: Hour %>"></asp:Localize>
<My:MyDropDownList ID="ddlMinutes" runat="server" OnDataBinding="ddlMinutes_DataBinding"></My:MyDropDownList>
<asp:Localize ID="Localize1" runat="server" Text="<%$Resources: Minute %>"></asp:Localize>